import React, { Component } from 'react'

export default class CommentHeader extends Component {
  render() {
    const { setActive, active } = this.props
    return (
      <h3 className="comm-head">
        热门评论<sub>(5)</sub>
        <span
          onClick={() => setActive('default')}
          className={active === 'default' ? 'active' : ''}
        >
          默认
        </span>
        <span
          onClick={() => setActive('time')}
          className={active === 'time' ? 'active' : ''}
        >
          时间
        </span>
      </h3>
    )
  }
}
